package br.com.pucrs.tcc.ed;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.LazyCollection;
import org.hibernate.annotations.LazyCollectionOption;

@Entity
@Table(name = "Professores")
@PrimaryKeyJoinColumn(name = "matricula")
@NamedQuery(name="professor.list", query="SELECT p FROM Professor p")
public class Professor extends Usuario {

	@Column(name="NUM_HORAS_ORIENTACAO")
	private Double numHorasOrientacao;

	@OneToMany
	@JoinColumn(name = "PROFESSORES_MATRICULA")
	@LazyCollection(LazyCollectionOption.FALSE)
	private List<ProfessorAreaInteresse> professorAreasInteresses;
	
	@Transient
	private Double cargaHoraria;
	
	@Transient
	private List<AreaInteresse> areasInteresse;
	
	public Professor() {
		cargaHoraria = 0.0;
	}
	
	public Double getNumHorasOrientacao() {
		return numHorasOrientacao;
	}

	public void setNumHorasOrientacao(Double numHorasOrientacao) {
		this.numHorasOrientacao = numHorasOrientacao;
	}

	public List<ProfessorAreaInteresse> getProfessorAreasInteresses() {
		return professorAreasInteresses;
	}

	public void setProfessorAreasInteresses(List<ProfessorAreaInteresse> professorAreasInteresses) {
		this.professorAreasInteresses = professorAreasInteresses;
	}

	public Double getCargaHoraria() {
		return cargaHoraria;
	}

	public void setCargaHoraria(Double cargaHoraria) {
		this.cargaHoraria = cargaHoraria;
	}

	public List<AreaInteresse> getAreasInteresse() {
		return areasInteresse;
	}

	public void setAreasInteresse(List<AreaInteresse> areasInteresse) {
		this.areasInteresse = areasInteresse;
	}


	
	
}
